﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using DomainDriver.DomainModeling.DataProviders;
using DomainDriver.DomainModeling.Queries;

namespace DomainDriver.DomainModeling.StorageManagers.EntityFrameworkStorage
{
    public interface IEfAggregate<T>
    {
        // LATER: Add ability to auto-chain calls to nested aggregates

        ICollection<QuerySpecification> OverriddenQueries { get; }
        bool SearchNestedAggregateValues(DbContext context, IParameterizedQuery<T> query);
        void ReadNestedAggregateValues(DbContext context, object rootQueryPredicate, Dictionary<string, object> batchReadState);
        void AddNestedAggregateValues(DbContext context);
        void UpdateNestedAggregateValues(DbContext context, T originalAggregate);
        void DeleteNestedAggregateValues(DbContext context);
    }
}